<!DOCTYPE html>
<html lang="zh-CN">
<head>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<meta charset="utf-8" />
<title>美站库 炫美网站大全</title>
<link rel="stylesheet" type="text/css" href="images/index.css" />
</head>
<body>
<div id="header">
	<div id="top" class="auto">
		<div class="logo">
			<h1>
				<img src="images/logo.png" />
				<span>炫美网站大全</span>
			</h1>
		</div>
		<div class="serach">
			<form >
				<input id="searchText" class="text" type="text" />
				<input id="searchButton" class="submit" type="button" value="搜索"  />
			</form>
		</div>
	</div>
	<div id="nav" class="auto">
		<ul>
			<li><a href="#">首页</a></li>
			<li><a href="#">提交站点</a></li>
		</ul>
	</div>
	<div id="runplay" class="auto">
		<div class="left">
			<a href="#"><img src="images/img1.jpg" /></a>
		</div>
		<div class="right">
			<dl>
				<dt id="runplayH">炫美网站，尽在美站库</dt>
				<dd class="txt" id="rate">本网站收集互联网上各种炫美网站......</dd>
				<dd class="btn">
					<a href="#">查看更多</a>
				</dd>
			</dl>
		</div>
	</div>
</div>
<div id="main">
	<div id="main1">
		<div id="wrap">
			<div id="leftBody">
				<div class="leftDiv1">
					<h2>搜索</h2>
					<p id="rsCount">搜索是<a href="http://www.sifangku.com" target="_blank">搜索</a>宇宙最强搜索</p>
				</div>
				<div class="leftDiv2">
					<h2>宇宙最强搜索</h2>
					<ul>
						<li>
							<a href="#"><img id="imgOne" src="https://img.meituan.net/600.600/msmerchant/8adc8ec4f896a8f44398819b6c69fb584226064.jpg" height="135px"/></a>
							<p id="titleOne" >鱻椒鸭嘴鱼（东晓南店）</p>
						</li>
						<li>
							<a href="http://s.click.taobao.com/t?e=m%3D2%26s%3Dxut4gj%2FSwlZw4vFB6t2Z2ueEDrYVVa64LKpWJ%2Bin0XLjf2vlNIV67vh04Fd0WrZt5ZnjZiNpIZaG%2F%2Ff1OvEKTtm%2FC9ecSCCfoEMB35yhV2bdLYK%2FxZ3%2Bm6ZjIOBDtaZdfo4oCMJErdduYLXkEqezeGJjUaqMe91LJXEjEHLOXzIkrGv0WqVwey3ei7tqcwYFFZelf5qcuRms3hdwMH9cUMYl7w3%2FA2kb&union_lens=lensId:0baff7bd_0d48_169585da916_8303"><img src="http://gaitaobao4.alicdn.com/tfscom/i3/1651994802/TB2P85aziCYBuNkHFCcXXcHtVXa_!!1651994802.jpg" height="135px"/></a>
							<p>女春2019新款韩版气质百搭蕾丝上衣+高腰显瘦chic格子裤两件套装</p>
						</li>
						<li>
							<a id="imageOne" href="#"><img src="images/image_04.jpg" /></a>
							<p id="titleOne">Professional</p>
						</li>
						<li>
							<a href="#"><img src="https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2530599636.webp" height="135px"/></a>
							<p>Professional</p>
						</li>
						<li>
							<a href="#"><img src="images/image_04.jpg" /></a>
							<p>Professional</p>
						</li>
					</ul>
				</div>
				<div class="leftDiv3">
					<a href="#">查看更多</a>
				</div>
			</div>
			<div id="rightBody">
				<div class="rightDiv1">
					<h2>酷文</h2>
					<ul>
						<li>
							<h3><a href="#" target="_blank">随便写点什么</a></h3>
							<p>随便写随便写的随便写的随便写的随便写的随便写的的...</p>
						</li>
						<li>
							<h3><a href="#" target="_blank">随便写点什么</a></h3>
							<p>随便写随便写的随便写的随便写的随便写的随便写的的...</p>
						</li>
						<li>
							<h3><a href="#" target="_blank">随便写点什么</a></h3>
							<p>随便写随便写的随便写的随便写的随便写的随便写的的...</p>
						</li>
					</ul>
				</div>
				<div class="rightDiv2">
					<dl class="dl1">
						<dt><a href="#">随便写点</a></dt>
						<dd>随便写点</dd>
					</dl>
					<dl class="dl2">
						<dt><a href="#">随便写点</a></dt>
						<dd>随便写点</dd>
					</dl>
				</div>
			</div>
		</div>
	</div>
</div>
<div id="footer">
	<p class="p1">
		<a href="#" target="_blank">首页</a>
		<a href="#" target="_blank">美站</a>
		<a href="#" target="_blank">酷文</a>
		<a class="last" href="#" target="_blank">联系我们</a>
	</p>
	<p>
		Copyright (c) 2014 | <a href="http://www.sifangku.com" target="_blank">私房库</a>
	</p>
</div>



<script>
$(document).ready(function(){

   var ajaxData = [];
   var titles=[];
   
   
	$.ajax({url:"data/douban300.json",
		
		success:function(result){
			ajaxData=result;
			  $("#rsCount").html("ajax访问成功");
			//alert(result.subjects[2].title);
			
			//alert(result.subjects.length);
			var i=0;
		   	for (i=0;i<ajaxData.subjects.length;i++)
			 {
			  titles.push(ajaxData.subjects[i].title);		 
			 }
		
		}});

		
    $( "#searchText" ).autocomplete({
      source: titles
    });

	$("#searchButton").click(function(){
	   var usrIp=$("#searchText").val();
	   $("#runplayH").html("您刚输入："+usrIp);	   
	   alert(usrIp);
	   
	   
	 //反查用户选择的电影名称，查评分rate, 查影片封面cover  
	 
	    var rate;
		var cover;
	   	for (i=0;i<ajaxData.subjects.length;i++)
			 {
			 
			   var currentTitle= ajaxData.subjects[i].title;
                   if(currentTitle==usrIp)
				     {
					   rate=ajaxData.subjects[i].rate;
					   cover=ajaxData.subjects[i].cover;
					    $("#rate").html("电影评分为："+rate);
              			$("#titleOne").html(ajaxData.subjects[i].title+" 电影评分为："+rate);			
					    $("#imgOne").attr('src', cover);	 
					    
					   return;
					 }
			 
			 }
	   
	   
	   		
		
	});
});
</script>
</body>
</html>